<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--
        	continue跳出当前循环，
        	break跳出循环
        -->
		<script>
			var number=10;
			var sum =0;
			var i = 0;
			while(i <= number){
				sum += i;
				i ++;
				if(i == 5) break;
				document.write("i = "+i+"<br>");
			}
			document.write("总合=" +sum);
		</script>
	</head>
	<body>
	</body>
</html>
